home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / fax / src / port / sgi / defs.cc next >
Text File  |  1994-08-01  |  10KB  |  331 lines

  1. #    $Header: /usr/people/sam/fax/port/sgi/RCS/defs.cc,v 1.42 1994/03/29 01:07:03 sam Rel $
  2. #
  3. # FlexFAX Facsimile Software
  4. #
  5. # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
  6. # Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
  7. # Permission to use, copy, modify, distribute, and sell this software and 
  8. # its documentation for any purpose is hereby granted without fee, provided
  9. # that (i) the above copyright notices and this permission notice appear in
  10. # all copies of the software and related documentation, and (ii) the names of
  11. # Sam Leffler and Silicon Graphics may not be used in any advertising or
  12. # publicity relating to the software without the specific, prior written
  13. # permission of Sam Leffler and Silicon Graphics.
  14. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  15. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  16. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  17. # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  18. # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  19. # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  20. # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  21. # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  22. # OF THIS SOFTWARE.
  23. #
  24.  
  25. #
  26. # These definitions are for building the software on an SGI 4D machine
  27. # under IRIX 4.x using C++ 2.1 or later.  Note that some options to
  28. # the C compiler may need to be changed depending on which version of
  29. # IRIX you have installed.
  30. #
  31. # TARGET:    sgi
  32. # COMPILER:    cc
  33. #
  34. SHELL    = /bin/sh
  35. DESTDIR    = .
  36. NULL    =
  37. MAKEFILE= Makefile
  38.  
  39. #
  40. # Location of auxiliary stuff needed for an SGI system
  41. #
  42. PORT    = ${DEPTH}/port/sgi
  43. GENERIC    = ${DEPTH}/port/generic
  44.  
  45. C++    = ${TOOLROOT}/usr/bin/CC
  46. CC    = ${TOOLROOT}/usr/bin/cc
  47. NAWK    = ${TOOLROOT}/usr/bin/nawk
  48. INSTALL    =${TOOLROOT}/etc/install
  49. MKDEPEND=${TOOLROOT}/usr/sbin/mkdepend
  50. SORT    = ${TOOLROOT}/bin/sort
  51. GENDIST    =${TOOLROOT}/usr/sbin/gendist
  52. AR    = ${TOOLROOT}/usr/bin/ar
  53. RANLIB    = /bin/true
  54. SED    = ${TOOLROOT}/bin/sed
  55.  
  56. #
  57. # AR options for creating/updating an archive
  58. #
  59. AROPTS=crls
  60.  
  61. #
  62. # Special options for lptops compilation (yech).
  63. #
  64. LPTOPSLCOPTS=-Olimit 1846 -Wf,-XNl3000
  65.  
  66. #
  67. # IRIX wants System V-style getty support.
  68. #
  69. SYSGETTY=GettySysV.c++
  70.  
  71. #
  72. # IRIX wants System V-style UUCP lock support.
  73. #
  74. UUCP_LOCKDIR=/usr/spool/locks
  75. UUCP_LOCKTYPE=0
  76. UUCP_LOCKMODE=0444
  77.  
  78. #
  79. # Location of Adobe Font Metrics for lptops.
  80. #
  81. AFMDIR=/usr/lib/DPS/AFM
  82.  
  83. #
  84. # PostScript imager for server.  PSPACKAGE is one of:
  85. #
  86. # dps    for Display Postscript
  87. # gs    for Ghostscript
  88. #
  89. # and PSIMAGER is the pathname of the binary executable.
  90. #
  91. PSPACKAGE=dps
  92. PSIMAGER=/usr/local/bin/ps2fax
  93.  
  94. #
  95. # Mail program for sending notification messages.
  96. #
  97. FAX_MAILCMD=/bin/mail
  98. SENDMAIL=/usr/lib/sendmail
  99.  
  100. #
  101. # Default optimizer and prototype options
  102. #
  103. OPTIMIZER=-O
  104. PROTOTYPES=-prototypes
  105. CVERSION=-xansi
  106.  
  107. # default definitions for programs--overide them as desired
  108. LIBS=    ${LIBUTIL} ${LIBTIFF} ${LIBIV}
  109. LLDLIBS=${LIBS} ${MACHDEPLIBS}
  110. #
  111. # Override this definition to eliminate shared library use.
  112. #
  113. SHDLIBC=-lc_s
  114.  
  115. #
  116. # Libraries that may from machine to machine (especially if
  117. # you use G++ instead of AT&T C++).
  118. #
  119. MACHDEPLIBS=-lmalloc -lsun -lC
  120. #
  121. # You must have v3.0 or newer of the TIFF library.  If
  122. # you already have it installed, or if you have version 3.0
  123. # or newer of InterViews installed (which includes the TIFF
  124. # library), you can point these to those places.  Otherwise,
  125. # you can just use the code provided here.
  126. #
  127. TIFF=    ${DEPTH}/libtiff
  128. LIBTIFF=${TIFF}/libtiff.a
  129. #
  130. # If you already have InterViews 3.0 or newer installed,
  131. # define these to be something like:
  132. #
  133. #IV=    /usr/include
  134. #LIBIV=    /usr/lib/libIV.a
  135. # Otherwise you can just use the subset of classes used by
  136. # the fax software and collected here in a hacked-up library.
  137. #
  138. IV=    ${DEPTH}/iv
  139. LIBIV=    ${IV}/libivhack.a
  140. # random utility functions and classes
  141. UTIL=    ${DEPTH}/util
  142. LIBUTIL=${UTIL}/libfaxutil.a
  143.  
  144. # "product" name for SGI inst&co
  145. PRODUCT=flexfax
  146.  
  147. #
  148. # Uid&Gid for installing server stuff.  Note that the server process
  149. # proper (/usr/etc/faxd or similar) must either run setuid root or
  150. # setuid uucp (i.e. fax and uucp must have the same uid).  This is
  151. # so that the fax server can participate in the UUCP locking scheme
  152. # and thereby implement tty line sharing (i.e. share the same line
  153. # and modem for both fax and data).
  154. #
  155. FAXUSER    = uucp
  156. FAXGROUP= nuucp
  157.  
  158. #
  159. # Directories where stuff gets placed:
  160. #
  161. # BIN        client-directed applications
  162. # LIBDATA    client-directed application library data files
  163. # LIBEXEC    client-directed application library executables
  164. # SPOOL        spooling area for servers
  165. # DOC        non-manual documentation
  166. # USRETC    place for servers (faxd & faxd.recv)
  167. #
  168. BIN=    /usr/local/bin
  169. LIBDATA=/usr/local/lib/fax
  170. LIBEXEC=/usr/local/lib/fax
  171. SPOOL=    /usr/spool/fax
  172. DOC=    /usr/local/doc/flexfax
  173. USRETC=    /usr/etc
  174. FILETYPE=/usr/lib/filetype
  175. #
  176. # Manual-related controls:
  177. #
  178. # MAN        head of manual tree
  179. # MANAPP    subdirectory for stuff in BIN
  180. # MANSYS    subdirectory for server & server-related apps
  181. # MANFILES    subdirectory for file format info 
  182. # PAGEDIRT    temp files to remove on clean/clobber
  183. #
  184. MAN    = /usr/catman/local
  185. MANAPPS    = man1
  186. MANSYS    = man1
  187. MANFILES= man4
  188.  
  189. NROFF    = nroff
  190. PACK    = pack -f
  191.  
  192. MANCAPP    = ${CLIENTAPPS:.1=.z}
  193. MANCFILE= ${CLIENTFILES:.4f=.z}
  194. MANSAPP    = ${SERVERAPPS:.1m=.z}
  195. MANSFILE= ${SERVERFILES:.4f=.z}
  196. PAGEDIRT= ${MANCAPP} ${MANCFILE} ${MANSAPP} ${MANSFILE}
  197.  
  198. .SUFFIXES: .1 .1m .4f .z
  199. .1.z:;    ${MANSED} $< | ${NROFF} -man >$*; ${RM} -f $@; ${PACK} $*
  200. .1m.z:;    ${MANSED} $< | ${NROFF} -man >$*; ${RM} -f $@; ${PACK} $*
  201. .4f.z:;    ${MANSED} $< | ${NROFF} -man >$*; ${RM} -f $@; ${PACK} $*
  202.  
  203. # programs used during installation
  204. ECHO=    /bin/echo
  205. FTR=    /usr/sbin/ftr
  206. GREP=    /bin/grep
  207. RM=    /bin/rm
  208. KILLALL=/etc/killall
  209. PWD=    /bin/pwd
  210. CHROOT=    /etc/chroot
  211.  
  212. #
  213. # Definitions used by common rules.
  214. #
  215. COMMONRULES=${DEPTH}/rules
  216. COMMONTARGS= clobber clean rmtargets depend incdepend
  217.  
  218. #
  219. # C compiler flags are composed of variable (set on the command line),
  220. # local (defined in the makefile), and global (defined in this file)
  221. # parts, in that order.  This ordering is used so that variable or
  222. # locally specified include directories are searched before the globally
  223. # specified ones.
  224. #
  225. CFLAGS=    ${CVERSION} ${VCFLAGS} ${LCFLAGS} ${GCFLAGS}
  226.  
  227. VCFLAGS=${VCDEFS} ${VCINCS} ${VCOPTS}
  228. LCFLAGS=${LCDEFS} ${LCINCS} ${LCOPTS}
  229. GCFLAGS=${GCDEFS} ${GCINCS} ${GCOPTS}
  230.  
  231. COPTS=    ${VCOPTS} ${LCOPTS} ${GCOPTS}
  232. CDEFS=    ${VCDEFS} ${LCDEFS} ${GCDEFS}
  233. CINCS=    ${VCINCS} ${LCINCS} ${GCINCS}
  234.  
  235. GCOPTS=-float ${OPTIMIZER} ${PROTOTYPES}
  236. GCDEFS=
  237. GCINCS=-I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF}
  238. #
  239. # C++ flags are decomposed using the same hierarchy as C flags.
  240. #
  241. C++FLAGS=${CVERSION} ${VC++FLAGS} ${LC++FLAGS} ${GC++FLAGS}
  242.  
  243. VC++FLAGS=${VC++DEFS} ${VC++INCS} ${VC++OPTS}
  244. LC++FLAGS=${LC++DEFS} ${LC++INCS} ${LC++OPTS}
  245. GC++FLAGS=${GC++DEFS} ${GC++INCS} ${GC++OPTS}
  246.  
  247. C++OPTS=${VC++OPTS} ${LC++OPTS} ${GC++OPTS}
  248. C++DEFS=${VC++DEFS} ${LC++DEFS} ${GC++DEFS}
  249. C++INCS=${VC++INCS} ${LC++INCS} ${GC++INCS}
  250.  
  251. GC++OPTS=+a1 +w +p -float ${OPTIMIZER}
  252. GC++INCS=-I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} \
  253.     -I${INCLDIR}/CC -I${INCLDIR}
  254. GC++DEFS=-DfxSIGHANDLER=SIG_PF -DfxSIGACTIONHANDLER=SIG_PF
  255.  
  256. #
  257. # Loader flags, composed of library (-l's) and option parts, with
  258. # the libraries appearing last.  Both of these are divided into variable,
  259. # local, and global parts.  The composition of LDFLAGS is done in the
  260. # other "direction" from CFLAGS so that all the -L's, that are part of
  261. # LDOPTS, appear before any of the -l's, which are part of LDLIBS.
  262. # Another benefit of segregating the libraries from the remaining of the
  263. # loader options is that the libraries alone can easily be given to
  264. # another program, e.g., lint.
  265. #
  266. # Notes:
  267. #   - If a program should not be linked with the shared version of libc,
  268. #     then its make file should override the setting of SHDLIBC with a
  269. #     line such as "SHDLIBC=".
  270. #
  271. LDFLAGS=${LDOPTS} ${LDLIBS}
  272.  
  273. LDOPTS=${VLDOPTS} ${LLDOPTS} ${GLDOPTS}
  274. LDLIBS=${VLDLIBS} ${LLDLIBS} ${GLDLIBS}
  275.  
  276. GLDOPTS=-L -L${ROOT}/usr/lib
  277. GLDLIBS=${SHDLIBC}
  278.  
  279. #
  280. # Convenient command macros that include the flags macros.
  281. #
  282. C++F=    ${C++} ${C++FLAGS}
  283. CCF=    ${CC} ${CFLAGS}
  284.  
  285. #
  286. # Shell script for generating make dependencies.  MKDEPEND is a shorthand
  287. # for the tool's absolute pathname.  MKDEPENDC adds MKDEPCFLAGS and the -c
  288. # mkdepend option to this.  The other language's mkdepend variables try to
  289. # include their language's name in the variable names.  Unfortunately, a
  290. # lot of makefiles already use the nondescript LMKDEPFLAGS for C language
  291. # mkdepend options, so we initialize LMKDEPCFLAGS with ${LMKDEPFLAGS}.
  292. #
  293. MKDEPENDC++    =${MKDEPEND} ${MKDEPC++FLAGS} -c "${C++F} ${C++FILE} -M"
  294. MKDEPENDC    =${MKDEPEND} ${MKDEPCFLAGS} -c "${CCF} -M"
  295.  
  296. MKDEPC++FLAGS    =${VMKDEPC++FLAGS} ${LMKDEPC++FLAGS} ${GMKDEPC++FLAGS}
  297. MKDEPCFLAGS    =${VMKDEPCFLAGS} ${LMKDEPCFLAGS} ${GMKDEPCFLAGS}
  298. LMKDEPCFLAGS    =${LMKDEPFLAGS}
  299.  
  300. GMKDEPFLAGS    =-e 's@ ${INCLDIR}/@ $${INCLDIR}/@' -e 's@ ${ROOT}/@ $${ROOT}/@'
  301. GMKDEPC++FLAGS    =${GMKDEPFLAGS} -s C++ -e 's@\.o++: @\.o: @'
  302. GMKDEPCFLAGS    =${GMKDEPFLAGS}
  303.  
  304. #
  305. # Macro to add to LMKDEPCFLAGS or LMKDEPC++FLAGS if your makefile builds
  306. # single-source programs using null suffix rules (e.g., .c:}.  This option
  307. # works for both C and C++ make depend.
  308. #
  309. NULLSUFFIX_MKDEPFLAG=-e 's@\.o+*:@:@'
  310. #
  311. # MKDEPFILE is the name of the dependency database, included by rules.
  312. #
  313. MKDEPFILE=Makedepend
  314. #
  315. # CDEPFILES lists all C or cc-compiled source files that depend on header
  316. # files computable by ${MKDEPENDC}.  C++DEPFILES lists all C++ files having
  317. # dependencies computable by ${MKDEPENDC++}.
  318. #
  319. C++DEPFILES=${C++FILES}
  320. CDEPFILES=${CFILES}
  321. DEPFILES=${C++DEPFILES} ${CDEPFILES}
  322.  
  323. #
  324. # Directory shorthands, mainly for make depend (see GMKDEPFLAGS above).
  325. #
  326. INCLDIR    =${ROOT}/usr/include
  327.